#pragma once
#include "Runtime/Base/Object.h"
#include "Component/SceneComponent.h"
#include "Component/ChildActorComponent.h"
namespace Alice{
    class Actor:public Object{
    public:
        SceneComponent*mRootComponent;
        ChildActorComponent*mParentComponent;
        std::vector<Actor*> mChildren;
        template<typename T>
        T* AddComponent()
        {
            T*component=new T;
            component->mWorldPrivate=mRootComponent->mWorldPrivate;
            FinishAddComponent(component);
            return component;
        }
        void FinishAddComponent(ActorComponent*inComponent);
    };
}